---
sidebar_position: 2
---

# Connect

Connect to a Chronik node via `chronik-client`.

Import `ChronikClient` and provide it the Chronik URL in the constructor:

```tsx
import { ChronikClient } from 'chronik-client';
const chronik = new ChronikClient(['https://chronik.e.cash']);
```

## Try it out!

You can try it out in this React component:

```jsx live
function DemoConnect() {
    return (
        <Json
            fn={async () => {
                const chronik = new ChronikClient([
                    'https://chronik.e.cash',
                ]);
                return await chronik.blockchainInfo();
            }}
        />
    );
}
```
